﻿<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="utf-8"/>
    <title>@ViewBag.Title </title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="~/css/font.css"/>
    <link rel="stylesheet" href="~/css/xadmin.css"/>
    <link rel="stylesheet" href="~/css/xadmin.theme.css"/>
    <link rel="stylesheet" href="~/css/site.css"/>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
        <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
        <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    @RenderSection("Styles", required: false)
</head>

<body style="height: 100%">

@RenderBody()

<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/layui/layui.all.js"></script>
<script src="~/js/xadmin.js"></script>
<script src="~/js/site.js"></script>
<script>
$.ajaxSetup({
    // complete: function (request, status) {
    //     if (typeof (request) != 'undefined') {
    //         var responseText = request.getResponseHeader("X-Responded-JSON");
    //         if (responseText != null) {
    //             window.tipError('系统提示', '登录超时，请重新登录', null, null, function () {
    //                 window.location.href = window.location.href;
    //             });
    //         }
    //     }
    // },
    error: function (jqXHR, textStatus, errorThrown) {
        var status = 0;
        var msg="";
        switch (jqXHR.status) {
            case (500):
                msg= "服务器系统内部错误";
                status = 500;
                break;
            case (401):
                msg="未登录";
                status = 401;
                break;
            case (403):
                msg="无权限执行此操作"; 
                status = 403;
                break;
            case (408):
                msg="请求超时";
                status = 408;
                break;
            case (0):
                msg="cancel";
                break;
            default:
                status = 1;
                msg="未知错误";
        }
        if (status > 0)
            layer.msg(msg);
    }
});

</script>
@RenderSection("Scripts", required: false)
</body>
</html>